<!DOCTYPE html>
<html lang="en">

<head>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>恒悦电商</title>

    <!-- Bootstrap Core CSS -->
    <link href="/App/Admin/public/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">

    <!-- MetisMenu CSS -->
    <link href="/App/Admin/public/vendor/metisMenu/metisMenu.min.css" rel="stylesheet">

    <!-- DataTables CSS -->
    <link href="/App/Admin/public/vendor/datatables-plugins/dataTables.bootstrap.css" rel="stylesheet">

    <!-- DataTables Responsive CSS -->
    <link href="/App/Admin/public/vendor/datatables-responsive/dataTables.responsive.css" rel="stylesheet">

    <!-- Custom CSS -->
    <link href="/App/Admin/public/dist/css/sb-admin-2.css" rel="stylesheet">

    <!-- Custom Fonts -->
    <link href="/App/Admin/public/vendor/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
        <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
        <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->

</head>

<body>

    <div id="wrapper">

        <!-- Navigation -->
        <nav class="navbar navbar-default navbar-static-top" role="navigation" style="margin-bottom: 0">
            <include file="Public:top"/>

			
			 <include file="Public:left"/>
        </nav>

        <div id="page-wrapper">
            <div class="row">
                <div class="col-lg-12">
                    <h1 class="page-header">客户预留信息列表</h1>
                </div>
                <!-- /.col-lg-12 -->
            </div>
            <!-- /.row -->
            <div class="row">
                <div class="col-lg-12">
                    <div class="panel panel-default">
                       <!-- <div class="panel-heading">
                            DataTables Advanced Tables
                        </div>-->
                        <!-- /.panel-heading -->
                        <div class="panel-body">
                            <table width="100%" class="table table-striped table-bordered table-hover" >
                                <thead>
                                    <tr>
									<th>序号</th>
                                    <th>客户预留电话</th>
									<th>预留时间</th>
									<th>信息状态</th>
									<th>操作</th>
					                </tr>
                                </thead>
                                <tbody>
								   <foreach name="list" item="item" >
                                    <tr class="odd gradeX">
                                      <td>{$item.id}</td>
									  <td>{$item.phone}</td>
									  <td>{$item.add_time|date='Y-m-d',###}</td>
									  
									  <td>
									  <if condition="$item.status eq 1 ">
									  未回复
									   <else/>
									   已回复
										
									  </if>
								    </td>
									  <td class="center" >
												
												<a id="{$item.id}" href="javascript:">删除</a> |
											
												<a href="{:U('User/editStatus','&id='.$item['id'])}">更改状态</a>
											</td>
																 
                                    </tr>
                                     </foreach>
                                      
                                </tbody>
                            </table>
                            <!-- /.table-responsive -->
                         {$page}
                        </div>
                        <!-- /.panel-body -->
                    </div>
                    <!-- /.panel -->
                </div>
                <!-- /.col-lg-12 -->
            </div>
          
        </div>
        <!-- /#page-wrapper -->

    </div>
    <!-- /#wrapper -->

    <!-- jQuery -->
    <script src="/App/Admin/public/vendor/jquery/jquery.min.js"></script>

    <!-- Bootstrap Core JavaScript -->
    <script src="/App/Admin/public/vendor/bootstrap/js/bootstrap.min.js"></script>

    <!-- Metis Menu Plugin JavaScript -->
    <script src="/App/Admin/public/vendor/metisMenu/metisMenu.min.js"></script>

    <!-- DataTables JavaScript -->
    <script src="/App/Admin/public/vendor/datatables/js/jquery.dataTables.min.js"></script>
    <script src="/App/Admin/public/vendor/datatables-plugins/dataTables.bootstrap.min.js"></script>
    <script src="/App/Admin/public/vendor/datatables-responsive/dataTables.responsive.js"></script>

    <!-- Custom Theme JavaScript -->
    <script src="/App/Admin/public/dist/js/sb-admin-2.js"></script>

    <!-- Page-Level Demo Scripts - Tables - Use for reference -->
	
	<script type="text/javascript">
$('[href="javascript:"]').click(function(){
    var t=$(this);
    var id=$(this).attr("id");
    var mymessage=confirm("你确定删除此条信息");  
    if(mymessage==true)  
    {  
        $.post('{:U('User/del')}',{id:id},function(data){
            if(data.status==100){
                    t.parent().parent().css("display","none");
						
            }
        });
     }  
    else if(mymessage==false)  
    {  
        
    }     

});
</script>

<script type="text/javascript">
$('[href="javascript:"]').click(function(){
    var t=$(this);
    var id=$(this).attr("id");
    var mymessage=confirm("你确定删除此条信息");  
    if(mymessage==true)  
    {  
        $.post('{:U('User/del')}',{id:id},function(data){
            if(data.status==100){
                    t.parent().parent().css("display","none");
						
            }
        });
     }  
    else if(mymessage==false)  
    {  
        
    }     

});
</script>
	
    <script>
    $(document).ready(function() {
        $('#dataTables-example').DataTable({
            responsive: true
        });
    });
    </script>

</body>

</html>
